package ch.ethz.inf.vs.sunspot.driveronspot;

import com.sun.spot.sensorboard.peripheral.LEDColor;

/**
 * helper class with common Constants
 * @author mayersi
 */
 public class Constants {
	/** the interval between two subsequent syncs expected from sunspot **/
	// public static int SPOT_SYNC_INTERVAL = 10000;
	public static final int SPOT_SYNC_MAXINTERVAL = 20000;
	public static final int SPOT_SYNC_MININTERVAL = 200;
	public static final int SPOT_SYNC_RECEIVETIMEOUT = 500;
	public static final double SPOT_SYNC_TOLERANCE_REL = 0.1;
	public static final int SPOT_SYNC_TOLERANCE_ABS = 500;
	public static final int SPOT_NUMBER_AVAILABLE_LEDS = 7;

        /** some color values **/
        public static final LEDColor colorActive = new LEDColor(0, 10, 0);
        public static final LEDColor colorActiveAndFast = new LEDColor(0, 20, 0);
        public static final LEDColor colorBlocked = new LEDColor(10, 0, 0);
        public static final LEDColor colorEstablishingConnection = new LEDColor(0, 0, 10);

	/** some communication port numbers **/
	public static final int SPOT_HOST_PORT = 67;
		
	/** names for the spot json encoding **/
	public static final String SPOT_LIGHT_NAME = "I";
	public static final String SPOT_TEMPERATURE_NAME = "T";
	public static final String SPOT_LED_NAME = "E";
	public static final String SPOT_SWITCH_NAME = "S";
	public static final String SPOT_ACCELERATION_NAME = "A";
        public static final String SPOT_TILT_NAME = "L";
        public static final String SPOT_LEDFUTURE_NAME = "F";
	public static final String SPOT_INTERVALFUTURE_NAME = "N";

	/** Messages, encoding/decoding **/
	public static String MESSAGE_SPOT_RESYNC = "R";
	public static String MESSAGE_SPOT_SYNC = "S";
        public static String MESSAGE_SPOT_HELO = "H";
	public static String SEPARATOR = ":";
        public static String YOU_ARE_BLOCKED = "B";
}
